<template>
    <div>
      <p>每次增加1:<button @click="incrementA">+</button> 数字: {{ countA }}</p>
      <p>每次减少1:<button @click="decrementB">-</button> 数字: {{ countB }}</p>
      
      
    </div>
  </template>
  
  <script>
  import { mapState, mapMutations } from 'vuex'
  
  export default {
    computed: {
      ...mapState(['countA', 'countB'])
    },
    methods: {
      ...mapMutations(['incrementA', 'decrementB'])
    }
  }
  </script>

<style scoped>
button{
    background-color: aqua;
    border-radius: 22%;
    border: 0;
}
</style>
  